package com.reborn.mall.api.common.exception;

/**
 * TODO: Here is description
 *
 * @author wu.yue
 * @since 2020/1/18
 */
public enum CRUDErrorCode implements IErrorCode {

    INSERT_FAILED(10001, "insert failed"),
    ENTITY_NOT_FOUND(10002, "entity not found"),
    UPDATE_FAILED(10003, "update failed");

    private int code;

    private String message;

    CRUDErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
